#include "MinerWife.hpp"

#include "../FSM/MinerWifeStates.hpp"

MinerWife::MinerWife() :
    smeg::core::BaseObject(),
    m_pStateMachine( NULL ),
    m_pHusband( NULL )
{
    m_pStateMachine = new smeg::core::StateMachine< MinerWife >( this );
    m_pStateMachine->SetGlobalState( MinerWifeGlobalState::GetInstance() );
    m_pStateMachine->ChangeState( DoHouseWork::GetInstance() );
}

MinerWife::~MinerWife() {
    delete m_pStateMachine;
    m_pStateMachine = NULL;
}

void MinerWife::Update( float _fDeltaTime ) {
    m_pStateMachine->Update();
}

bool MinerWife::HandleMessage( const smeg::core::MessageInfo& _Msg ) {
    return m_pStateMachine->HandleMessage( _Msg );
}

smeg::core::StateMachine< MinerWife >* MinerWife::GetStateMachine() {
    return m_pStateMachine;
}

void MinerWife::SetHusband( smeg::core::BaseObject* _pHusband ) {
    m_pHusband = _pHusband;
}

smeg::core::BaseObject* MinerWife::GetHusband() const {
    return m_pHusband;
}